package com.wn.mapper;

import com.wn.common.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(@Param("userId") Integer userId,@Param("updateUserId") Integer updateUserId,@Param("updateTime") Date updateTime);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer userId);

    User selectByAccount(String userAccount);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
    //高级搜索
    List<User> superSearch(String superSearchKeyWord);
    //按条件查询
    List<User> searchSomeByPage(User user);

    //根据userid查询出该用户的权限
    User getUserRole(@Param("userid") Integer userid);

    int upNewPasswordByUserAccount(@Param("account") String account,@Param("newPassword") String newPassword);

    int unbunding(@Param("userEmail")String userEmail,@Param("userPhone")String userPhone,@Param("userIdcard")String userIdcard,@Param("userId")int userId);
}
